<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1.声明set
        let s = new Set();
        let s2 = new Set(['a','a','b','c'])//满足高中数学集合的三大特性
        // 2.常用方法
        console.log(s2.size());//查看元素个数
        console.log(s2.add('e'))//新增元素
        console.log(s2.delete('e'));//删除元素
        console.log(s2.has('a'));//判断存在性
        s2.clear()//清空数据
    </script>
</body>
</html>